<template>            
  <dv-scroll-board :config="config" ref="table1" style="height: calc(100% - 15px)" />
</template>
<script>
export default {
  data() {
    return {
      config: {
        header: ['<span style="color: #fff; font-weight: 700">企业项目</span>', '<span style="font-weight: 700">成立时间</span>'],
        headerHeight: 35,
        headerBGC: '#202D5A', // 表头0f1325
        oddRowBGC: '#202D5A', // 奇数行
        evenRowBGC: '#193670', // 偶数行
        // index: true,
        columnWidth: [250, 100],
        align: ['left', 'center'],
        data: []
      }
    };
  },
  mounted() {
    this.getProject();
  },
  created() {},
  methods: {
    // 获取企业信息数据
    getProject () {
      this.$get('/safetyproduction/getEnterpriseInfo').then(res => {
        if (res.code !== 0) {
          return this.$message.error(res.msg)
        }
        let arr = new Array()
        res.data.map((item) => {
          arr.push([item.name, item.foundDate.substring(0, 10)])
        })
        this.config.data = arr
        this.$refs['table1'].updateRows(arr)
      })
    },
  },
};
</script>
